local skill = fk.CreateSkill {
  name = "#klee_seal_skill",
  attached_equip = "klee_seal",
  attached_skill_name = "klee_seal_active_skill&",
}

skill:addAcquireEffect(function (self, player)--玩家上玉玺时给其他人玉玺的技能
  local room = player.room
  for _, p in ipairs(room:getOtherPlayers(player, false)) do
    room:handleAddLoseSkills(p, skill.attached_skill_name, nil, false, true)
  end
end)

skill:addEffect(fk.AfterPropertyChange, {--失去装备后删技能，但要注意场上还有无其他人有玉玺
  can_refresh = function(self, event, target, player, data)
    return target == player
  end,
  on_refresh = function(self, event, target, player, data)
    local room = player.room
    if table.find(room.alive_players, function (p)
      return p ~= player and p:hasSkill(skill.name, true)
    end) then
      room:handleAddLoseSkills(player, skill.attached_skill_name, nil, false, true)
    else
      room:handleAddLoseSkills(player, "-" .. skill.attached_skill_name, nil, false, true)
    end
  end,
})


return skill
